<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
    <meta charset="UTF-8">
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    <c:set var="materialBelongsCustomer" value="<%=ResourcesUtil.getConfig(\"material_belongs_customer\")%>" />
    <c:set var="materialBelongsPurchase" value="<%=ResourcesUtil.getConfig(\"material_belongs_purchase\")%>" />
    <script src="${ctxStatic}/jquery-barcode/jquery-barcode.js" type="text/javascript"></script>
    <script>
    var varMaterialBelongsCustomer = "${materialBelongsCustomer}";
    var varMaterialBelongsPurchase = "${materialBelongsPurchase}";
    $(document).ready(function(){
        materialSourceFun();
        $("#materialPlacement,#materialStyleCategory,#materialLevel,#materialSeason,#materialUnitCd,#materialUseType,#materialTypeCd,#materialKnitMethod,#materialOgnizationId,#materialSource,#materialStyle,#brandID").select2();
        $("#materialBarCodeDiv").empty().barcode($("#materialBarCode").val(), "code128",{barWidth:2, barHeight:30,showHRI:false});
        $("#backBtn").click(function(){
            $("#showHtml").removeClass("showHtml");
            $("#confirmPage").css("display","none");
            $("#editPage").css("display","block");
            $('#inputForm').find('input,radio,select,textarea').attr('disabled',false);
            return false;
        });
       });
    //保存方法
    var checkForm={
            t:null,
            check:function(t){
              /* //如果物料款式null 则等于''
              if($("#materialStyleCategory").val()==null){
                  $("#materialStyleCategory").val('');
              }
             if($("#materialStyleCategory").val()!=""&&$("#materialStyleCategory").val()!=null){
                 if($("#materialStyleCategory").val().length>6){
                     // 选择物料款式过多！
                     layer.msg('<spring:message code="material_choosed_style_over"/>', {time:1000});
                     return;
                 }
             }
             if($("#materialPlacement").val()==null){
                 $("#materialPlacement").val('');
             }
             if($("#materialPlacement").val()!=""&&$("#materialPlacement").val()!=null){
                 if($("#materialPlacement").val().length>6){
                     // 选择物料部位过多！
                     layer.msg('<spring:message code="material_choosed_placement_over"/>', {time:1000});
                     return;
                 }
             } */
             $(t).attr("disabled",true);
             this.t=t;
             $("#inputForm").validate({
            	 rules: {
                     materialCode: {remote: "${ctx}/material/message/checkName?oldMaterialCode=" +$("#oldMaterialCode").val() },
                 },
                 messages: {
                     //物料代码已存在
                     materialCode: {remote: '<spring:message code="material_code_exist"/>'},
                 },
                 fail: function(element,e) {  
                   $(checkForm.t).attr("disabled",false);
                 },
                 submitHandler: function(form) {
	                 $("#showHtml").addClass("showHtml");
	                 $("#confirmPage").css("display","block");
	                 $("#editPage").css("display","none");
	                 $(checkForm.t).attr("disabled",false);
	                 $('#inputForm').find('input,radio,select,textarea').attr('disabled',true);
                 }
             });
             // 提交表单
             $("#inputForm").submit(); 
            }
    }
   
    var saveForm={
    		s:null,
            t:null,
            save:function(s,t){
            	$('#inputForm').find('input,radio,select,textarea').attr('disabled',false);
                $(t).attr("disabled",true);
                this.s=s;
                this.t=t;
                // 格式化，去除逗号
                formUnFormat($("#inputForm"));
                var materialSample="";
                if ($("input[type='checkbox']").is(':checked')) {
                	materialSample = "1";
				}else{
					materialSample = "0";
				}
         	    var params = $("#inputForm").serialize();
                $.post("${ctx}/material/message/save?materialSample="+materialSample,params,function(result){
               	 // 提示信息
                    tipParent(result.message);
                    // 返回状态
                    if(result.statusCode==STATUSCODEOK){
                        if(saveForm.s==1){

                         // 刷新页面
                            window.parent.frames[2].searchListForm();
                            window.location.href='${ctx}/material/message/form';
                            
                        }else{
                            window.parent.frames[2].searchListForm();
                            closeWin(); 
                        }
                      }else{
                          $(saveForm.t).attr("disabled",false);
                      }
                },'json');
            } 
       }
    
    /* // 物料来源联动
    function materialBelongsFun(t){
        var code=$(t).find("option:selected").attr("data-value");
        var param = '';
        // 供货商 
        if(code==4){
        	$("#materialBelongs").val(varMaterialBelongsPurchase);
        	param={"materialBelongsCd":varMaterialBelongsPurchase};
        // 客户	
        }else if(code==5){
        	$("#materialBelongs").val(varMaterialBelongsCustomer);
        	param={"materialBelongsCd":varMaterialBelongsCustomer};
        }else{
        	$("#materialBelongs").val('');
        	$("#divMaterialBelongs").text('');
        	return;
        }
        
        $.post("${ctx}/material/message/findMaterialBelongs",param,function(result){            
        	$("#divMaterialBelongs").text(result);
        },'json');
    } */
    function materialSourceFun(t) {
    	var code=$("#materialSource").find("option:selected").val();
    	var ognizationType = "";
    	if (code==varMaterialBelongsCustomer) {
    		ognizationType = 5;
		}else if (code==varMaterialBelongsPurchase) {
			ognizationType = 4;
		}else{
			return;
		}
    	var id = "${material.id}";
    	
			var ognizationID = '${material.materialOgnizationId}';
			param={"ognizationType":ognizationType,"id":id,"materialOgnizationId":ognizationID};
		
    	$.post("${ctx}/material/message/findOgnization",param,function(result){            
        	$("#ognizationHtml").html($(callBackHtml(result)).find("#ognizationHtml").html());
        	$("#materialOgnizationId").select2();
        	materialOgnizationFun();
        },'html');
	}
    function materialOgnizationFun() {
    	var id = "${material.id}";
    	var brandID = "${material.brandID}";
    	var materialOgnizationId=$("#materialOgnizationId").find("option:selected").val();
    	param={"materialOgnizationId":materialOgnizationId,"id":id,"brandID":brandID};
    	$.post("${ctx}/material/message/findBrand",param,function(result){            
        	$("#brandHtml").html($(callBackHtml(result)).find("#brandHtml").html());
        	$("#brandID").select2();
        },'html');
	}
    </script> 
</head>
<body>
    <!-- 创建页面head部 -->
	<div id="editPage" class="layerHeader clearfix">
	    <c:choose>
	        <c:when test="${material.id!=null && material.id!=''}">
	             <!-- 修改编辑 -->
	            <p class="headerTitle"><spring:message code="material_modifyMaterial"/></p>
	        </c:when>
	        <c:otherwise>
	             <!-- 新建 -->
	            <p class="headerTitle"><spring:message code="material_createMaterial"/></p>
	        </c:otherwise>
	    </c:choose>
	    <div class="headerButton clearfix">
	        <shiro:hasPermission name="material:message:edit">
	        <button type="button" id="confirmBtn" onclick="checkForm.check(this)"><spring:message code="btn_ok"/></button>
	        </shiro:hasPermission>
	        <button type="button" onclick="closeWin()"><spring:message code="btn_cancle"/></button>
	    </div>
	    
	</div>
	
    <form id="inputForm" method="post">
    <input type="hidden" id="id" name="id" value="${material.id}"/>
    <input type="hidden"  name="version" value="${material.version}"/>
    <input type="hidden" id="oldMaterialCode"  name="oldMaterialCode" value="${material.materialCode}"/>
    <c:set value="<%=ResourcesUtil.getConfig(\"material_Category\")%>" var="materialCategory" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_Unit\")%>" var="materialUnit" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_UseType\")%>" var="useType" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_season\")%>" var="season" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_styleCategory\")%>" var="styleCategory" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_placement\")%>" var="placement" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_level\")%>" var="level" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_knit_method\")%>" var="materialKnitMethodList" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_source\")%>" var="materialSourceList" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_style\")%>" var="materialStyleList" />
	<c:set value="<%=ResourcesUtil.getConfig(\"material_use\")%>" var="materialUseList" />
	<c:set value="<%=ResourcesUtil.getConfig(\"material_source_customer\")%>" var="materialSourceCustomer" />
	
	<!-- 确认页面head部 -->
	<div id="confirmPage" class="layerHeader clearfix" style="display:none">
		<p class="headerTitle"><spring:message code="material_head_confirm_material"/></p>
	    <div class="headerButton clearfix">
	        <shiro:hasPermission name="material:message:edit">
	        <button type="button" id="saveBtn" onclick="saveForm.save(0,this)"><spring:message code="material_save"/></button>
	        <c:if test="${empty material.id}">
	        <button type="button" id="saveContBtn" onclick="saveForm.save(1,this)"><spring:message code="material_saveAndContinue"/></button>
	        </c:if>
	        </shiro:hasPermission>
	        <button type="button" id="backBtn"><spring:message code="material_btn_back"/></button>
	    </div>
	</div>
	
    <div id="showHtml">
	    <div class="smList" style="padding: 20px 100px;">
		  <div class="left w-350">
		    <div class="items clearfix haveToBox">
		  	    <!-- 物料编码 -->
                <p class="tit"><spring:message code="material_showMateial_code"/></p>
                <input style="width:70%" type="text" name="materialCode" value="${material.materialCode}"  maxlength="22"  data-rule-required="true"   data-msg-required="<spring:message code="material_pleaseInput_materialCode"/>" >
                <p class="haveTo">*</p>
		    </div>
		    <div id="ognizationHtml" class="items clearfix haveToBox">
			    <!-- 客	 户 -->
	            <p class="tit"><spring:message code="material_showMateial_ognizationList"/></p>
	              <select style="width:70%" id="materialOgnizationId" name="materialOgnizationId" onchange="materialOgnizationFun();" data-rule-required="true"  data-msg-required="<spring:message code="material_pleaseChoosedOgnization"/>">
	                 <option value=""><spring:message code="material_pleaseChoosed"/></option>
	                 <c:forEach items="${material.ognizationList}" var="ognizationInfo">
	                    <option data-value="${ognizationInfo.ognizationType}" <c:if test="${material.materialOgnizationId eq ognizationInfo.id}">selected="selected"</c:if> value="${ognizationInfo.id}" > 
	                       ${ognizationInfo.ognizationName}
	                    </option>
	                 </c:forEach>
	              </select>
	              <p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix">
		  	    <!-- 供货商名称 -->
                <p class="tit"><spring:message code="material_showMateial_supplierName"/></p>
                <input style="width:70%" type="text" name="materialSupplierName" value="${material.materialSupplierName}"  maxlength="22">
		    </div>
		    
		    <div class="items clearfix haveToBox">
			    <!-- 物料类别 -->
	            <p class="tit"><spring:message code="material_showMateial_materialType"/></p>
	              <select style="width:70%" id="materialTypeCd" name="materialTypeCd"  data-rule-required="true"  data-msg-required="<spring:message code="material_pleaseChoosedMaterialType"/>">
	                 <option value=""><spring:message code="material_pleaseChoosed"/></option>
	                 <c:forEach items="${fns:getDictList(materialCategory)}"   var="category">
	                    <option  <c:if test="${fn:split(material.materialTypeCd,'-')[1] eq category.itemValue}">selected="selected"</c:if> value="${category.itemCode}-${category.itemValue}" > 
	                       ${category.itemName}
	                    </option>
	                 </c:forEach>
	              </select>
	              <p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix">
		        <!-- 中文名称 -->
		        <p class="tit"><spring:message code="material_showMateial_nameCn"/></p>
		        <input style="width:70%" type="text" name="materialNameCn" value="${material.materialNameCn}" maxlength="49" >
		    </div>
		    <div class="items clearfix haveToBox">
			    <!-- 物料规格 -->
		        <p class="tit"><spring:message code="material_showMateial_spec"/></p>
		        <input style="width:70%" type="text" data-rule-banjiao="true" data-msg-banjiao="<spring:message code="material_pleaseInput_banjiao"/>" name="materialSpec" value="${material.materialSpec}" maxlength="49"   data-msg-required="<spring:message code="material_pleaseInput_materialSpec"/>" data-rule-required="true" >
	            <p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix haveToBox">
		       <!-- 物料克重-->
			   <p class="tit"><spring:message code="material_showMateial_materialGramWeight"/></p>
			   <input style="width:70%" type="tel" name="materialGramWeight" value="<fmt:formatNumber value="${material.materialGramWeight}" pattern="#,#00.00#"/>" onblur="formatNumber(this)" onfocus="unFormat(this)" data-rule-maxlength="20"   data-msg-maxlength="<spring:message code="material_pleaseInput_materialGramWeight"/>"   data-msg-required="<spring:message code="material_pleaseInput_materialGramWeight"/>" data-rule-required="true" data-rule-integerDecimalmax="17.3"  data-msg-integerDecimalmax="<spring:message code="material_pleaseInput_materialGramWeight"/>">
               <p class="haveTo">*</p>
		    </div>
		    
		    <%-- <div class="items clearfix">
			    <!-- 物料款式 -->
		        <p class="tit"><spring:message code="material_showMateial_style"/></p>
		        <select style="width:70%" class="sex mult" id="materialStyleCategory" multiple="multiple" name="materialStyleCategory">
                  <c:forEach items="${fns:getDictList(styleCategory)}"   var="style">
                  <option  value="${style.itemCode}-${style.itemValue}"
                    <c:forEach items="${fn:split(material.materialStyleCategory,',')}" var="selectStyle" >
                      <c:if test="${fn:split(selectStyle,'-')[1] eq style.itemValue}">selected="selected"</c:if>
                    </c:forEach>
                   > 
                   ${style.itemName}
                  </option> 
                  </c:forEach>
                </select>
		    </div> --%>
     	    <div class="items clearfix">
     	    	
	               <!-- 物料年份 -->
	               <p class="tit"><spring:message code="material_year"/></p>
	               <input style="width:40px" type="text" name="materialYear" value="${material.materialYear}" maxlength="4" data-rule-nonnegativeInteger="true"  data-msg-nonnegativeInteger="<spring:message code="material_pleaseInput_year"/>">
			    
			    	<!-- 季节 -->
			        <p class="tit" align="center"><spring:message code="material_season"/></p>&ensp;
			        <select style="width:37%" id="materialSeason" name="materialSeason">
	                 <option value=""><spring:message code="material_pleaseChoosed"/></option>
	                 <c:forEach items="${fns:getDictList(season)}"   var="seasons">
	                <option  <c:if test="${fn:split(material.materialSeason,'-')[1] eq seasons.itemValue}">selected="selected"</c:if> value="${seasons.itemCode}-${seasons.itemValue}" > 
	                 ${seasons.itemName}
	                </option>
	                </c:forEach>
	                </select>
	                
		    </div>
		    <div class="items clearfix haveToBox">
		       <!-- 物料颜色 -->
		       <p class="tit"><spring:message code="material_showMateial_color"/></p>
		       <input style="width:70%" type="text" name="materialColor" value="${material.materialColor}" maxlength="50"   data-msg-required="<spring:message code="material_pleaseInput_materialColor"/>" data-rule-required="true" >
               <p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix haveToBox">
		  	    <!-- 纱织密度 -->
                <p class="tit"><spring:message code="material_showMateial_threadCount"/></p>
                <input style="width:70%" type="text" name="materialThreadCount" value="${material.materialThreadCount}"  maxlength="22"  data-rule-required="true"   data-msg-required="<spring:message code="material_pleaseInput_threadCount"/>">
		    	<p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix haveToBox">
		       <!-- 物料织法 -->
		       <p class="tit"><spring:message code="material_showMateial_knitMethod"/></p>
			   	<select style="width:70%" id="materialKnitMethod" name="materialKnitMethod" data-rule-required="true"   data-msg-required="<spring:message code="material_pleaseInput_materialKnitMethod"/>">
                  <option value=""><spring:message code="material_pleaseChoosed"/></option>
                  <c:forEach items="${fns:getDictList(materialKnitMethodList)}" var="knitMethod">
                  <option  <c:if test="${fn:split(material.materialKnitMethod,'-')[1] eq knitMethod.itemValue}">selected="selected"</c:if> value="${knitMethod.itemCode}-${knitMethod.itemValue}" > 
                       ${knitMethod.itemName}
                  </option>
                  </c:forEach>
                </select>
                <p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix">
		  	    <!-- 样品物料 -->
                <p class="tit"><spring:message code="material_showMateial_sample"/></p>
                <input style="width: 20px;margin-top: 7px;"  type="checkbox" id="materialSample" name="materialSampleCK" <c:if test="${material.materialSample=='1'}">checked="checked"</c:if>  value="1">
                <p class="tit"><spring:message code="material_showMateial_materialSample"/></p>
		    </div>
		    <div class="items clearfix">
		       <!-- 描述 -->
               <p class="tit"><spring:message code="material_remarks"/>(0/100)</span></p>
               <textarea style="width:70%" name="remarks"  maxlength="100" value="${material.remarks}">${material.remarks}</textarea>
		    </div>        
		  </div>
		  <div class="right w-350">
		    <%-- <div class="items clearfix">
		       	<!-- 业务类别 -->
	            <p class="tit"><spring:message code="material_showMateial_businessType"/></p>
                <select style="width:70%" id="materialUseType" name="materialUseType">
                  <c:forEach items="${fns:getDictList(useType)}" var="type">
                  <option  <c:if test="${fn:split(material.materialUseType,'-')[1] eq type.itemValue}">selected="selected"</c:if> value="${type.itemCode}-${type.itemValue}" > 
                       ${type.itemName}
                  </option>
                  </c:forEach>
                </select>
		    </div> --%>
		    <div class="items clearfix">
		 	    <!-- 物料条形码 -->
		        <p class="tit"><spring:message code="material_showMateial_barCode"/></p>
		        <div id="materialBarCodeDiv"></div>
		        <input type="hidden" id="materialBarCode" name="materialBarCode" value="${material.materialBarCode}"> 
		    </div>
		    <div id="brandHtml" class="items clearfix">
		  	    <!-- 客户品牌 -->
                <p class="tit"><spring:message code="material_showMateial_brandName"/></p>
                 <select style="width:70%" class="sex mult" id="brandID" name="brandID">
                 <option value=""><spring:message code="material_pleaseChoosed"/></option>
	                    <c:forEach items="${ognization.selBrandList}" var="brandIdInfo">
			                    <c:forEach items="${fn:split(ognization.commaBrandId,',')}" var="selectBrandId" >
		                    		<c:if test="${selectBrandId eq brandIdInfo.id}">
		                    			<option <c:if test="${material.brandID==brandIdInfo.id}">selected="selected"</c:if>  value="${brandIdInfo.id}">${brandIdInfo.brandCn}</option>
			                      	</c:if>
			                    </c:forEach>
	                    </c:forEach>
                    </select>
		    </div>
		    <%-- <div class="items clearfix">
		       <!-- 物料所属 -->
		       <p class="tit"><spring:message code="material_showMateial_materialBelongs"/></p>
		       <div id="divMaterialBelongs">${fns:getDictName(material.materialBelongs)}</div>
		       <input type="hidden" id="materialBelongs"  name="materialBelongs" value="${material.materialBelongs}"/>
		    </div> --%>	
		    <div class="items clearfix">
		  	    <!-- 来源类别 -->
                <p class="tit"><spring:message code="material_showMateial_source"/></p>
                <select style="width:70%" id="materialSource" name="materialSource" onchange="materialSourceFun();" disabled="disabled">
                  <option value=""><spring:message code="material_pleaseChoosed"/></option>
                  <c:forEach items="${fns:getDictList(materialSourceList)}" var="source">
                  <option  <c:if test="${fn:split(materialBelongsCustomer,'-')[1] eq source.itemValue && material.id==null}">selected="selected"</c:if> <c:if test="${fn:split(material.materialSource,'-')[1] eq source.itemValue}">selected="selected"</c:if> value="${source.itemCode}-${source.itemValue}" > 
                       ${source.itemName}
                  </option>
                  </c:forEach>
                </select>
		    </div>
		    <div class="items clearfix haveToBox">
		       <!-- 物料成分 -->
		       <p class="tit"><spring:message code="material_showMateial_texture"/></p>
		       <input style="width:70%" type="text" name="materialComposition" value="${material.materialComposition}" maxlength="49"   data-msg-required="<spring:message code="material_pleaseInput_composition"/>" data-rule-required="true" >
		       <p class="haveTo">*</p>
		    </div>	
		    <div class="items clearfix">
		       <!-- 英文名称 -->
		       <p class="tit"><spring:message code="material_showMateial_produced"/></p>
		       <input style="width:70%" type="text" class="form-control" name="materialProduced" value="${material.materialProduced}"  maxlength="49">
		    </div>
		    <div class="items clearfix haveToBox">
			   <!-- 物料单位 -->
			   <p class="tit"><spring:message code="material_showMateial_unit"/></p>
			   	<select style="width:70%" class="sex" id="materialUnitCd" name="materialUnitCd" data-rule-required="true" data-msg-required="<spring:message code="material_pleaseChoosedMaterialUnitCd"/>" >
                  <option value=""><spring:message code="material_pleaseChoosed"/></option>
                  <c:forEach items="${fns:getDictList(materialUnit)}"   var="unit">
                  <option  <c:if test="${fn:split(material.materialUnitCd,'-')[1] eq unit.itemValue}">selected="selected"</c:if> value="${unit.itemCode}-${unit.itemValue}" > 
                       ${unit.itemName}
                  </option>
                  </c:forEach>
                </select>
	            <p class="haveTo">*</p>
		    </div>
		    <div class="items clearfix">
		       <!-- 物料等级 -->
		       <p class="tit"><spring:message code="material_showMateial_materialLevel"/></p>
		       <select style="width:70%" class="sex" id="materialLevel" name="materialLevel" >
                   <option value=""><spring:message code="material_pleaseChoosed"/></option>
                   <c:forEach items="${fns:getDictList(level)}"   var="levels">
                   <option  <c:if test="${fn:split(material.materialLevel,'-')[1] eq levels.itemValue}">selected="selected"</c:if> value="${levels.itemCode}-${levels.itemValue}" > 
                      ${levels.itemName}
                   </option>
                   </c:forEach>
               </select>
		    </div>
		    
		    <div class="items clearfix">
		  	    <!-- 物料用途 -->
                <p class="tit"><spring:message code="material_showMateial_materialUseType"/></p>
                <select style="width:70%" id="materialUseType" name="materialUseType">
                  <option value=""><spring:message code="material_pleaseChoosed"/></option>
                  <c:forEach items="${fns:getDictList(materialUseList)}" var="useType">
                  <option  <c:if test="${fn:split(material.materialUseType,'-')[1] eq useType.itemValue}">selected="selected"</c:if> value="${useType.itemCode}-${useType.itemValue}" > 
                       ${useType.itemName}
                  </option>
                  </c:forEach>
                </select>
		    </div>
		    <div class="items clearfix haveToBox">
		  	    <!-- 物料风格 -->
                <p class="tit"><spring:message code="material_showMateial_materialStyle"/></p>
                <select style="width:70%" id="materialStyle" name="materialStyle" data-rule-required="true"   data-msg-required="<spring:message code="material_pleaseInput_materialStyle"/>">
                  <option value=""><spring:message code="material_pleaseChoosed"/></option>
                  <c:forEach items="${fns:getDictList(materialStyleList)}" var="style">
                  <option  <c:if test="${fn:split(material.materialStyle,'-')[1] eq style.itemValue}">selected="selected"</c:if> value="${style.itemCode}-${style.itemValue}" > 
                       ${style.itemName}
                  </option>
                  </c:forEach>
                </select>
                <p class="haveTo">*</p>
		    </div>
		    <%-- <div class="items clearfix">
		       <!-- 物料部位 -->
		       <p class="tit"><spring:message code="material_showMateial_placement"/></p>
	           <select style="width:70%" class="sex mult" id="materialPlacement" name="materialPlacement" multiple="multiple" >
                  <c:forEach items="${fns:getDictList(placement)}"   var="placements">
                     <option  value="${placements.itemCode}-${placements.itemValue}"
                       <c:forEach items="${fn:split(material.materialPlacement,',')}" var="selectPlacements" >
                            <c:if test="${fn:split(selectPlacements,'-')[1] eq placements.itemValue}">selected="selected"</c:if> 
                       </c:forEach>
                      > 
                      ${placements.itemName}
                     </option>
                  </c:forEach>
               </select>
		    </div> --%>
		    <div class="items clearfix">
		       	<!-- 状态 -->
	            <p class="tit"><spring:message code="common_status"/></p>
                <div class="labelBox">
                    <label>
                        <input name="enableFlag" value="1" type="radio" <c:if test="${material.enableFlag == null}">checked</c:if><c:if test="${material.enableFlag eq 1}">checked</c:if>><spring:message code="dict_enable"/>
                    </label>
                    <label>
                        <input name="enableFlag" value="0" type="radio" <c:if test="${material.enableFlag eq 0}">checked</c:if>><spring:message code="dict_disable"/>
                    </label>
                </div>
		    </div>
		    <div class="items clearfix">
             <!-- 上传图片 -->
             <input type="hidden" name="fileId" value="${material.fileId}" >
             <input style="width:70%" id="nameImage" type="hidden" name="filePath"  value="${material.uploadFile.showImgUrl}"  htmlEscape="false" maxlength="255" class="input-xlarge" data-msg-required="<spring:message code="material_img_url"/>" /> 
             <sys:ckfinder input="nameImage" type="images" uploadPath="/custom" selectMultiple="false" maxWidth="100" maxHeight="100"/>
		    </div>
		  </div>
		</div>
	</div> 	
</form>
</body>
</html>